﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MainPage.master" AutoEventWireup="true" CodeFile="CitiesManage.aspx.cs" Inherits="Manage_CitiesManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/Manage/Js/CitiesManage.js"></script>
<script type="text/javascript">
    ModelOfCity =<%=new Cities().ToJsonString() %>;
    SelectOptionOfProvince ='<%=SelectOptionOfProvince %>';
</script>

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
  <tr>
    <td align="center"><img src="/Manage/Images/sousuo.gif" />请选择省份：

      <select name="ddlProvinceIDOfSearch" id="ddlProvinceIDOfSearch">
        <option value="">--不限--</option>
         <%=SelectOptionOfProvince %>
        </select>
      &nbsp;城市名称：
      <input name="txtKeyWords" type="text" id="txtKeyWords" size="25"  class="border6"/>
      &nbsp;
      <input name="btnSearch" type="button" id="btnSearch" value="执行搜索" class="btn2"  onclick="GoToSearch();"/> &nbsp;&nbsp; [ <a href="CitiesManage.aspx" class="red bold">查看全部</a> ]</td>
  </tr>
</table>
<br />
<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center"  >
  <tr >
    <td colspan="7" align="left" class="HeadTitle">&gt;&gt;城市管理</td>
    </tr>
  <tr class="TableHeadRow">
    <td width="60" align="center">编号</td>
    <td align="left">城市名称</td>
    <td width="150" align="center">所属省份</td>
    <td width="60" align="center">排序值</td>
    <td width="150" align="center">最后调整日期</td>
    <td width="150" align="center">创建日期</td>
    <td width="150" align="center">管理 [<a href="javascript:Add();" class="red">+添加城市</a>] </td>
  </tr>

  <%
      if (listOfCities != null)
      {
          for (int i = 0; i < listOfCities.Count; ++i)
          {
              CityInfo c = listOfCities[i];
   %>

  <tr onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';" >
    <td align="center"><%=(p.CurPage-1)*p.PageSize +i+1 %>.</td>
    <td align="left"><a href="javascript:void(0);" onclick="Edit(<%=c.City.CityID%>);"><%=c.City.CityName%>(ID=<%=c.City.CityID%>)</a> [ <a href="AreasManage.aspx?ProvinceID=<%=c.City.ProvinceID.ToString() %>&CityID=<%=c.City.CityID%>" class="green">查看该城市下的区域</a> ] </td>
    <td align="center" ><a href="<%=Utility.GetNewUrl("ProvinceID",c.City.ProvinceID.ToString(),false) %>" title="点击查看该省份下的所有城市"><%=c.ProvinceName %></a></td> 
    <td align="center"  class="green bold"><%=c.City.OrderValue %></td>
    <td align="center"><%=c.City.LastModifyDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center"><%=c.City.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center">[ <a href="javascript:void(0);" onclick="Edit(<%=c.City.CityID%>);">编辑</a> ] [ <a href="javascript:void(0);" onclick="Delete(<%=c.City.CityID%>);" class="red">删除</a> ]     </td>
  </tr>
  <% }
  %>
      <tr>
    <td colspan="7" align="center" ><span class="page" >
         <%=Utility.GetPageLine(Utility.GetWebPageUrlNoCurPage(), p.CurPage, p.PageSize,10, p.TotalCount)%>    
        </span></td>
    </tr> 
   <%        
      }
      else
      { %>

  <tr>
    <td colspan="7" align="center" class="red">[ 未找到任何信息！]</td>
    </tr>
    <%} %>
</table>

</asp:Content>

